Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove the annoying tail message shows on every command with -h or --help #1490

Merged
merged 12 commits into from
Jan 14, 2024

Conversation

Halimao
Copy link
Contributor

@Halimao Halimao commented Jan 2, 2024

This PR fixed the tail error message on every command with -h or --help: error parsing commandline arguments: flag: help requested

Before:
image

After:
image

@Halimao Halimao requested review from a team as code owners January 2, 2024 09:21
@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Jan 2, 2024
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR. I've made a suggestion for a way to refactor is, and avoid repeating ourselves for each package.

contribs/gnokeykc/main.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Jan 8, 2024
tm2/pkg/commands/command.go Outdated Show resolved Hide resolved
tm2/pkg/commands/command.go Outdated Show resolved Hide resolved
Co-authored-by: Hariom Verma <hariom18599@gmail.com>
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution 🙏

I've left some minor comments, otherwise it seems good to go

tm2/pkg/commands/command.go Outdated Show resolved Hide resolved
tm2/pkg/commands/command.go Outdated Show resolved Hide resolved
@zivkovicmilos
Copy link
Member

@Halimao
Can you please check the linting errors in this PR? 🙏

You can run the linter using make lint from the root repository. Make sure you have golangci-lint installed globally

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d184938) 55.85% compared to head (3cfbbe1) 56.11%.

Files Patch % Lines
gno.land/cmd/gnokey/main.go 0.00% 1 Missing ⚠️
gno.land/cmd/gnoland/root.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1490      +/-   ##
==========================================
+ Coverage   55.85%   56.11%   +0.26%     
==========================================
  Files         431      432       +1     
  Lines       65839    66076     +237     
==========================================
+ Hits        36773    37078     +305     
+ Misses      26185    26102      -83     
- Partials     2881     2896      +15     
Flag Coverage Δ
go-1.21.x ∅ <ø> (∅)
misc ∅ <ø> (∅)
misc-_test.genstd ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Halimao
Copy link
Contributor Author

Halimao commented Jan 11, 2024

@Halimao Can you please check the linting errors in this PR? 🙏

You can run the linter using make lint from the root repository. Make sure you have golangci-lint installed globally

Hi sir, is there anything else that needs to be added?

@thehowl
Copy link
Member

thehowl commented Jan 12, 2024

Hey @Halimao,

I forgot to approve the workflow, but I checked the changes again and as I expected, there are some failing tests (that depended on help requested being in the output). Please address them (you can probably check for the USAGE string instead).

There's also a build failing in contribs :) Also pinging @zivkovicmilos to hear whether he agrees with the renaming.

Thanks!

@Halimao
Copy link
Contributor Author

Halimao commented Jan 13, 2024

@thehowl Hi sir, I have fixed the failed tests, I think we can go now😀

@thehowl thehowl merged commit 2b53933 into gnolang:master Jan 14, 2024
190 checks passed
@Halimao Halimao deleted the fix/remove-cli-error branch January 14, 2024 11:28
gfanton pushed a commit to moul/gno that referenced this pull request Jan 18, 2024
…or --help (gnolang#1490)

This PR fixed the tail error message on every command with -h or --help:
`error parsing commandline arguments: flag: help requested`

Before:

![image](https://github.com/gnolang/gno/assets/25278203/8bc998d6-8d6a-45e0-aeca-7957cc15b96a)

After:

![image](https://github.com/gnolang/gno/assets/25278203/a2ab7b5a-0dd2-4bcc-a8d1-49e71e1e3d51)

---------

Co-authored-by: Hariom Verma <hariom18599@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants